package client;

import redis.clients.jedis.Jedis;

public class RedisClient {
    public static void main(String[] args) {
        MyCluster jediscluster = new MyCluster();
        MyCluster.jedisCluster.set("lover","Cui Chuman");
        System.out.println("my love:"+MyCluster.jedisCluster.get("lover"));
        //write();
    }

    public static   void write(){
        Jedis redis = new Jedis("linux128", 7002);
//在Redis中写字符串 key value
        //redis.set("jedis:name:1","jd-zhangfei");
//获得Redis中字符串的值
        System.out.println(redis.get("lover"));
//在Redis中写list
       // redis.lpush("jedis:list:1","1","2","3","4","5");
//获得list的长度
        //System.out.println(redis.llen("jedis:list:1"));

    }

}
